package com.yanxx.codegenerator.model;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 编码操作响应模型
 */
@Schema(description = "编码操作响应")
public class CodeOperationResponse {

    @Schema(description = "操作是否成功", example = "true", required = true)
    private boolean success;

    @Schema(description = "操作消息", example = "操作成功")
    private String message;

    public CodeOperationResponse() {
    }

    public CodeOperationResponse(boolean success) {
        this.success = success;
        this.message = success ? "操作成功" : "操作失败";
    }

    public CodeOperationResponse(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}